package com.demo.entity.enums;

public enum KnowledgeTypeEnum {
    ARTICLE(0, "文章"),
    VEDIO(1, "视频"),
    OHTER(2,"其他")
    ;

    private Integer status;
    private String desc;

    KnowledgeTypeEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static KnowledgeTypeEnum getByStatus(Integer status) {
        for (KnowledgeTypeEnum item : KnowledgeTypeEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
